package org.springblade.core.ds.model;

public class DataSourceLog {
    public static String logLevel = "error";

    public static void setLogLevel(String level){
        logLevel = level;
    }

    public static boolean isDebug() {
        return logLevel.equalsIgnoreCase("DEBUG");
    }

    public static boolean isInfo() {
        return logLevel.equalsIgnoreCase("DEBUG") || logLevel.equalsIgnoreCase("INFO");
    }

    public static boolean isError() {
        return logLevel.equalsIgnoreCase("DEBUG") || logLevel.equalsIgnoreCase("INFO") || logLevel.equalsIgnoreCase("ERROR");
    }
}
